package com.sand.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "userinfo", schema = "ssh_pro", catalog = "")
public class UserinfoEntity {
/**
 *
 *
 * @author <achao1441470436@gmail.com>
 * @since 2021/11/30/030 11:14
 */
    private int rid;
    private String phone;
    private int isAttest;
    private int isHouse;
    private Timestamp createTime;
    private String password;


    @Id
    @Column(name = "rid")
    public int getRid() {
        return rid;
    }

    public void setRid(int rid) {
        this.rid = rid;
    }

    @Basic
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @Column(name = "isAttest")
    public int getIsAttest() {
        return isAttest;
    }

    public void setIsAttest(int isAttest) {
        this.isAttest = isAttest;
    }

    @Basic
    @Column(name = "isHouse")
    public int getIsHouse() {
        return isHouse;
    }

    public void setIsHouse(int isHouse) {
        this.isHouse = isHouse;
    }

    @Basic
    @Column(name = "createTime")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "password")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserinfoEntity that = (UserinfoEntity) o;
        return rid == that.rid && isAttest == that.isAttest && isHouse == that.isHouse && Objects.equals(phone, that.phone) && Objects.equals(createTime, that.createTime) && Objects.equals(password, that.password);
    }

    @Override
    public String toString() {
        return "UserinfoEntity{" +
                "rid=" + rid +
                ", phone='" + phone + '\'' +
                ", isAttest=" + isAttest +
                ", isHouse=" + isHouse +
                ", createTime=" + createTime +
                ", password='" + password + '\'' +
                '}';
    }

    @Override
    public int hashCode() {
        return Objects.hash(rid, phone, isAttest, isHouse, createTime, password);
    }
}
